<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
            <title>Swanky by Free CSS Templates</title>
            <meta name="keywords" content="">
                <meta name="description" content="">
                    <link href="style.css" rel="stylesheet" type="text/css" media="screen">
                        <!-- DC Pagination CSS -->
                        <link type="text/css" rel="stylesheet" href="tsc_pagination.css">
                            <title>Tim kiem</title>
                            </head>
                                <body>


                                <!-- start header -->
                                <?php require_once './header.php'; ?>
                                <!-- end header -->
                                <hr>
                                    <form>
                                        <td>Thanh tim kiem</td>
                                        <input type="text" name="keyword"  value="" />
                                        <input type="submit" name="seach" value="Tim kiem" />
                                    </form>
                                    <?php
                                    $ketnoi = mysql_connect('localhost', 'root', 'vertrigo');
                                    mysql_select_db('table');
                                    if (isset($_POST['seach'])) {
                                        $keyword = @$_POST('keyword');
                                        $sql = mysql_query("SELECT * FROM 'articles' WHERE 'title' Like '%$keyword%'");
                                        $num_row = mysql_num_rows($sql);
                                    if ($num_row == 0) {
                                            ?>
                                            Khong tim thay ket qua<?php echo $keyword; ?>
                                            <?php
                                    } else {
                                            ?> 
                                            ket qua tim duoc 
                                            <?php echo $keyword; ?> co 
                                            <?php echo $num_row; ?> ket qua.
                                            <ul>
                                                <?php
                                                while ($row = mysql_fetch_array($sql)) {
                                                    ?>
                                                    <li> 
                                                        <?php echo $row['title']; ?>
                                                    </li>
                                                    <?php
                                                }
                                                echo"</ul>";
                                            }
                                        }
                                        ?>
                                        <!-- start page -->
                                        <div id="page">
                                            <!-- start content -->
                                            <?php require_once './content.php'; ?>
                                            <!-- end content -->
                                            <!-- start sidebar one -->
                                            <?php require_once './sidebarone.php'; ?>
                                            <!-- end sidebar one -->
                                            <!-- start sidebar two -->
                                            <?php require_once './sidebartwo.php'; ?>
                                            <!-- end sidebar two -->
                                            <div style="clear: both;">&nbsp;</div>
                                        </div>
                                        <!-- end page -->
                                        <hr>
                                            <!-- start footer -->
                                            <?php require_once './footer.php'; ?>
                                            <!-- end footer -->

                                            <div align="center">This template  downloaded form <a href="http://all-free-download.com/free-website-templates/">free website templates</a></div>

                                            </body>

                                            </html>
